﻿/*
** 课程详细页
*/
$(function() {
    
    //加入课程
    $(".learnbtn").live("click", function() {
        var id = $("#hdid").val();
        common.ajax(function(data) {
            location.href = location.href;
        }, null, "../JoinClass", { courseId: id }, 'POST');

    });
    
    //发表评论
    $(".eval").live("click", function() {
        var text = $("#txteval").val();
        var id = $("#hdid").val();
        if (text.length > 0) {
            common.ajax(function(data) {
                location.href = location.href;
            }, null, "../EvalClass", { courseId: id, text: text }, 'POST');
        }
    });
})